<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html" 
      xmlns:pou="http://primefaces.org/ui">
    <head>
        <title>TODO supply a title</title>
    </head>
    <body>
        <ui:composition>
            <pou:confirmDialog id="confirmDialog" message="Esta seguro de eliminar los datos?"  
                               header="Eliminar" severity="alert" widgetVar="confirmation">  
                <pou:commandButton id="confirm" immediate="true" value="Si" update="@form" oncomplete="confirmation.hide()"  
                                   actionListener="#{mbGenericMaintenance.actionDelete()}" />  
                <pou:commandButton id="decline" value="No" onclick="confirmation.hide()" type="button" />   
            </pou:confirmDialog>  
            <pou:tabView>
                <pou:tab title="#{mbGenericMaintenance.title}" >
                    <h:panelGrid style="width: 500px;">
                        <h:panelGroup rendered="#{mbGenericMaintenance.enableHeader}" id="header">
                            <pou:focus context="header"/>  
                            <pou:panel header="Datos Registro">
                                <ui:include src="#{mbGenericMaintenance.formPage}" />
                            </pou:panel>
                        </h:panelGroup>
                        <pou:toolbar>
                            <pou:toolbarGroup align="left">
                                <pou:commandButton rendered="#{mbGenericMaintenance.actionNew}" update="@form"  value="Nuevo" actionListener="#{mbGenericMaintenance.actionNew()}" />                    
                                <pou:commandButton rendered="#{mbGenericMaintenance.actionDelete}" onclick="confirmation.show()" value="Eliminar" type="button" />
                            </pou:toolbarGroup>
                            <pou:toolbarGroup align="rigth">
                                <pou:commandButton rendered="#{mbGenericMaintenance.actionUpdate}" update="@form"  value="Guardar" actionListener="#{mbGenericMaintenance.actionUpdate()}" />
                                <pou:commandButton rendered="#{mbGenericMaintenance.actionSave}"  update="@form" value="Guardar" actionListener="#{mbGenericMaintenance.actionSave()}" />
                                <pou:commandButton rendered="#{mbGenericMaintenance.actionCancel}" update="@form" value="Cancelar" actionListener="#{mbGenericMaintenance.actionCancel()}" immediate="true" />
                            </pou:toolbarGroup>
                        </pou:toolbar>
                        <h:panelGroup id="detail">
                            <ui:include src="#{mbGenericMaintenance.gridPage}" />
                        </h:panelGroup>
                    </h:panelGrid>
                </pou:tab>
            </pou:tabView>
        </ui:composition>
    </body>
</html>
